package top.tagao.m03_beHavioralPatterns.b_13chain.middleware;

/**
 * @author Viktor.Liu
 * @Date 2023/4/28 17:46
 */
public class RoleCheckMiddleWare extends  MiddleWare{

    @Override
    public boolean handle(String email, String password) {
        if (email.equals("admin@example.com")) {
            System.out.println("Hello, admin!");
            return true;
        }
        System.out.println("Hello, user!");
        return handleNext(email, password);
    }
}
